package com.lj.controller;

import com.lj.pojo.User;
import com.lj.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
@Slf4j
public class UserController {

    @Autowired
    private UserService userService;

    @RequestMapping("/find/{id}")
    public User find(@PathVariable("id") String id){
        log.info("8081");
        return userService.selectUser(new User(id));
    }

}
